home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / gl_dev.idb / usr / include / gl / iminterp.h.z / iminterp.h
Encoding:
C/C++ Source or Header  |  1996-12-06  |  18.5 KB  |  559 lines

  1. #ifndef __GL_IMINTERP_H__
  2. #define __GL_IMINTERP_H__
  3. /**************************************************************************
  4.  *                                      *
  5.  *          Copyright (C) 1989, Silicon Graphics, Inc.            *
  6.  *                                      *
  7.  *  These coded instructions, statements, and computer programs  contain  *
  8.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  9.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  10.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  11.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  12.  *                                      *
  13.  **************************************************************************/
  14.  
  15. /*
  16.  *  iminterp.h 
  17.  *  - some pretty complex but powerful macros by Herb Kuta to generate
  18.  *    display listable GL commands  
  19.  *
  20.  *  $Revision: 1.26 $
  21.  */
  22.  
  23. #include "cppdefs.h"
  24. #include "dlsz.h"
  25. #include "dlpers.h"
  26. #include "TheMacro.h"
  27.  
  28. #ifdef IGLOO 
  29. #define DL_EXTRA_IM_SETUP()
  30. #else
  31. #define DL_EXTRA_IM_SETUP()    im_setup
  32. #endif /* IGLOO */
  33.  
  34. #define    DL_GENCMD_0(intrp_sclass,name)                \
  35.     DL_IMMED_BEGIN(visible,name,(void))                \
  36.     {                                 \
  37.     DL_EXTRA_IM_SETUP();                    \
  38.     TOKENPASTE(im_,name)();                    \
  39.     }                                 \
  40.     DL_IMMED_END(name)                         \
  41.     DL_CMPLR_BEGIN(visible,name,(void))                \
  42.     {                                 \
  43.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  44.     ADDINTRP(name);                        \
  45.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  46.     }                                 \
  47.     DL_CMPLR_END(name)                         \
  48.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  49.     {                                 \
  50.     TOKENPASTE(im_,name)();                    \
  51.     thread(name);                         \
  52.     }                                 \
  53.     DL_INTRP_END(name)
  54.  
  55.  
  56. #define    DL_GENCMD_1(intrp_sclass,name,type)            \
  57.     DL_IMMED_BEGIN(visible,name,( type x))            \
  58.     {                                 \
  59.         DL_EXTRA_IM_SETUP();                    \
  60.     TOKENPASTE(im_,name)(x);                 \
  61.     }                                 \
  62.     DL_IMMED_END(name)                         \
  63.     DL_CMPLR_BEGIN(visible,name,( type x))            \
  64.     {                                    \
  65.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  66.     ADDINTRP(name);                        \
  67.     TOKENPASTE(ADD,type)(x);                \
  68.     TOKENPASTE(ADDFILL,type)();                \
  69.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  70.     }                                 \
  71.     DL_CMPLR_END(name)                         \
  72.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  73.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0));     \
  74.     thread(name);                         \
  75.     DL_INTRP_END(name)
  76.  
  77.  
  78. #define    DL_GENCMD_1C(intrp_sclass,name,type)            \
  79.     DL_IMMED_BEGIN(visible,name,( const type x))        \
  80.     {                                 \
  81.     DL_EXTRA_IM_SETUP();                    \
  82.     TOKENPASTE(im_,name)(x);                 \
  83.     }                                 \
  84.     DL_IMMED_END(name)                         \
  85.     DL_CMPLR_BEGIN(visible,name,( const type x))        \
  86.     {                                    \
  87.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  88.     ADDINTRP(name);                        \
  89.     TOKENPASTE(ADD,type)(x);                \
  90.     TOKENPASTE(ADDFILL,type)();                \
  91.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  92.     }                                 \
  93.     DL_CMPLR_END(name)                         \
  94.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  95.     {                                 \
  96.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0));     \
  97.     thread(name);                         \
  98.     }                                 \
  99.     DL_INTRP_END(name)
  100.  
  101.  
  102. #define DL_GENCMD_2(intrp_sclass,name,type)            \
  103.     DL_IMMED_BEGIN(visible,name,( type x, type y))        \
  104.     {                                 \
  105.     DL_EXTRA_IM_SETUP();                    \
  106.     TOKENPASTE(im_,name)(x,y);                 \
  107.     }                                 \
  108.     DL_IMMED_END(name)                         \
  109.     DL_CMPLR_BEGIN(visible,name,( type x, type y))        \
  110.     {                                 \
  111.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  112.     ADDINTRP(name);                        \
  113.     TOKENPASTE(ADD,type)(x);                \
  114.     TOKENPASTE(ADD,type)(y);                \
  115.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  116.     }                                 \
  117.     DL_CMPLR_END(name)                         \
  118.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  119.     {                                 \
  120.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  121.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)));    \
  122.     thread(name);                         \
  123.     }                                 \
  124.     DL_INTRP_END(name)
  125.  
  126. #define DL_GENCMD_2_TYPES(intrp_sclass,name,type1,type2)        \
  127.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y))            \
  128.     {                                                           \
  129.     DL_EXTRA_IM_SETUP();                    \
  130.         TOKENPASTE(im_,name)(x,y);                              \
  131.     }                                                           \
  132.     DL_IMMED_END(name)                                          \
  133.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y))            \
  134.     {                                                           \
  135.         BEGINCOMPILE(TOKENPASTE(DLSZ_,name));                   \
  136.         ADDINTRP(name);                                         \
  137.         TOKENPASTE(ADD,type1)(x);                               \
  138.         TOKENPASTE(ADD,type2)(y);                               \
  139.         ENDCOMPILE(TOKENPASTE(DLSZ_,name));                     \
  140.     }                                                           \
  141.     DL_CMPLR_END(name)                                          \
  142.     DL_INTRP_BEGIN(intrp_sclass,name)                           \
  143.     {                                                           \
  144.         TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),                  \
  145.                     TOKENPASTE(TAKE,type1)(TOKENPASTE(DLSZ_,type1)));     \
  146.         thread(name);                                           \
  147.     }                                                           \
  148.     DL_INTRP_END(name)
  149.  
  150. #define DL_SPECMD_2(intrp_sclass,name,type1,type2)         \
  151.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y))        \
  152.     {                                 \
  153.     DL_EXTRA_IM_SETUP();                    \
  154.     TOKENPASTE(im_,name)(x,y);                 \
  155.     }                                 \
  156.     DL_IMMED_END(name)                         \
  157.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y))        \
  158.     {                                 \
  159.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  160.     ADDINTRP(name);                        \
  161.     TOKENPASTE(ADD,type1)(x);                \
  162.     TOKENPASTE(ADD,type2)(y);                \
  163.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  164.     }                                 \
  165.     DL_CMPLR_END(name)                         \
  166.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  167.     {                                 \
  168.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),            \
  169.             TOKENPASTE(TAKE,type2)(TOKENPASTE(DLSZ_,type1)));    \
  170.     thread(name);                         \
  171.     }                                 \
  172.     DL_INTRP_END(name)
  173.  
  174. #define DL_GENCMD_3(intrp_sclass,name,type)            \
  175.     DL_IMMED_BEGIN(visible,name,( type x, type y, type z))     \
  176.     {                                 \
  177.     DL_EXTRA_IM_SETUP();                    \
  178.     TOKENPASTE(im_,name)(x,y,z);                 \
  179.     }                                 \
  180.     DL_IMMED_END(name)                         \
  181.     DL_CMPLR_BEGIN(visible,name,( type x, type y, type z))     \
  182.     {                                 \
  183.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  184.     ADDINTRP(name);                        \
  185.     TOKENPASTE(ADD,type)(x);                 \
  186.     TOKENPASTE(ADD,type)(y);                 \
  187.     TOKENPASTE(ADD,type)(z);                 \
  188.     TOKENPASTE(ADDFILL,type)();                \
  189.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  190.     }                                 \
  191.     DL_CMPLR_END(name)                         \
  192.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  193.     {                                 \
  194.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  195.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  196.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)));     \
  197.     thread(name);                         \
  198.     }                                 \
  199.     DL_INTRP_END(name)
  200.  
  201. #define DL_SPECMD_3(intrp_sclass,name,type1,type2,type3)    \
  202.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y, type3 z))    \
  203.     {                                 \
  204.     im_setup;                         \
  205.     TOKENPASTE(im_,name)(x,y,z);                 \
  206.     }                                 \
  207.     DL_IMMED_END(name)                         \
  208.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y, type3 z))   \
  209.     {                                 \
  210.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  211.     ADDINTRP(name);                        \
  212.     TOKENPASTE(ADD,type1)(x);                 \
  213.     TOKENPASTE(ADD,type2)(y);                 \
  214.     TOKENPASTE(ADD,type3)(z);                 \
  215.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  216.     }                                 \
  217.     DL_CMPLR_END(name)                         \
  218.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  219.     {                                 \
  220.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),        \
  221.             TOKENPASTE(TAKE,type2)(TOKENPASTE(DLSZ_,type1)),    \
  222.             TOKENPASTE(TAKE,type3)(2*TOKENPASTE(DLSZ_,type2)));         \
  223.     thread(name);                         \
  224.     }                                 \
  225.     DL_INTRP_END(name)
  226.  
  227. #define DL_GENCMD_4(intrp_sclass,name,type)            \
  228.     DL_IMMED_BEGIN(visible,name,( type x, type y, type z, type w)) \
  229.     {                                 \
  230.     DL_EXTRA_IM_SETUP();                    \
  231.     TOKENPASTE(im_,name)(x,y,z,w);                 \
  232.     }                                 \
  233.     DL_IMMED_END(name)                         \
  234.     DL_CMPLR_BEGIN(visible,name,( type x, type y, type z, type w)) \
  235.     {                                 \
  236.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  237.     ADDINTRP(name);                        \
  238.     TOKENPASTE(ADD,type)(x);                 \
  239.     TOKENPASTE(ADD,type)(y);                 \
  240.     TOKENPASTE(ADD,type)(z);                 \
  241.     TOKENPASTE(ADD,type)(w);                 \
  242.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  243.     }                                 \
  244.     DL_CMPLR_END(name)                         \
  245.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  246.     {                                 \
  247.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),        \
  248.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  249.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)),    \
  250.             TOKENPASTE(TAKE,type)(3*TOKENPASTE(DLSZ_,type)));     \
  251.     thread(name);                         \
  252.     }                                 \
  253.     DL_INTRP_END(name)
  254.  
  255. #define DL_GENCMD_5(intrp_sclass,name,type)            \
  256.     DL_IMMED_BEGIN(visible,name,( type x, type y, type z, type w, type q)) \
  257.     {                                 \
  258.     DL_EXTRA_IM_SETUP();                    \
  259.     TOKENPASTE(im_,name)(x,y,z,w,q);            \
  260.     }                                 \
  261.     DL_IMMED_END(name)                         \
  262.     DL_CMPLR_BEGIN(visible,name,( type x, type y, type z, type w, type q)) \
  263.     {                                 \
  264.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  265.     ADDINTRP(name);                        \
  266.     TOKENPASTE(ADD,type)(x);                 \
  267.     TOKENPASTE(ADD,type)(y);                 \
  268.     TOKENPASTE(ADD,type)(z);                 \
  269.     TOKENPASTE(ADD,type)(w);                 \
  270.     TOKENPASTE(ADD,type)(q);                 \
  271.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  272.     }                                 \
  273.     DL_CMPLR_END(name)                         \
  274.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  275.     {                                 \
  276.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),        \
  277.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  278.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)),    \
  279.             TOKENPASTE(TAKE,type)(3*TOKENPASTE(DLSZ_,type)),     \
  280.             TOKENPASTE(TAKE,type)(4*TOKENPASTE(DLSZ_,type)));     \
  281.     thread(name);                         \
  282.     }                                 \
  283.     DL_INTRP_END(name)
  284.  
  285. #define DL_GENCMD_7(intrp_sclass,name,type)            \
  286.     DL_SPECMD_7(intrp_sclass,name,type,type,type,type,type,type,type)
  287.  
  288.  
  289. #define DL_SPECMD_4(intrp_sclass,name,type1,type2,type3,type4)    \
  290.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w)) \
  291.     {                                 \
  292.     DL_EXTRA_IM_SETUP();                    \
  293.     TOKENPASTE(im_,name)(x,y,z,w);                \
  294.     }                                 \
  295.     DL_IMMED_END(name)                         \
  296.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w)) \
  297.     {                                 \
  298.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  299.     ADDINTRP(name);                        \
  300.     TOKENPASTE(ADD,type1)(x);                 \
  301.     TOKENPASTE(ADD,type2)(y);                 \
  302.     TOKENPASTE(ADD,type3)(z);                 \
  303.     TOKENPASTE(ADD,type4)(w);                 \
  304.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  305.     }                                 \
  306.     DL_CMPLR_END(name)                         \
  307.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  308.     {                                 \
  309.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),            \
  310.             TOKENPASTE(TAKE,type2)(TOKENPASTE(DLSZ_,type1)),    \
  311.             TOKENPASTE(TAKE,type3)(2*TOKENPASTE(DLSZ_,type2)),    \
  312.             TOKENPASTE(TAKE,type4)(3*TOKENPASTE(DLSZ_,type3)));    \
  313.     thread(name);                         \
  314.     }                                 \
  315.     DL_INTRP_END(name)
  316.  
  317. #define DL_SPECMD_6(intrp_sclass,name,type1,type2,type3,type4,type5,type6)    \
  318.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w, type5 q, type6 a)) \
  319.     {                                 \
  320.     im_setup;                         \
  321.     TOKENPASTE(im_,name)(x,y,z,w,q,a);            \
  322.     }                                 \
  323.     DL_IMMED_END(name)                         \
  324.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w, type5 q, type6 a)) \
  325.     {                                 \
  326.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  327.     ADDINTRP(name);                        \
  328.     TOKENPASTE(ADD,type1)(x);                 \
  329.     TOKENPASTE(ADD,type2)(y);                 \
  330.     TOKENPASTE(ADD,type3)(z);                 \
  331.     TOKENPASTE(ADD,type4)(w);                 \
  332.     TOKENPASTE(ADD,type5)(q);                 \
  333.     TOKENPASTE(ADD,type6)(a);                 \
  334.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  335.     }                                 \
  336.     DL_CMPLR_END(name)                         \
  337.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  338.     {                                 \
  339.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),            \
  340.             TOKENPASTE(TAKE,type2)(TOKENPASTE(DLSZ_,type1)),    \
  341.             TOKENPASTE(TAKE,type3)(2*TOKENPASTE(DLSZ_,type2)),    \
  342.             TOKENPASTE(TAKE,type4)(3*TOKENPASTE(DLSZ_,type3)),     \
  343.             TOKENPASTE(TAKE,type5)(4*TOKENPASTE(DLSZ_,type4)),     \
  344.             TOKENPASTE(TAKE,type6)(5*TOKENPASTE(DLSZ_,type5)));    \
  345.     thread(name);                         \
  346.     }                                 \
  347.     DL_INTRP_END(name)
  348.  
  349. #define DL_SPECMD_7(intrp_sclass,name,type1,type2,type3,type4,type5,type6,type7)    \
  350.     DL_IMMED_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w, type5 q, type6 a, type7 b)) \
  351.     {                                 \
  352.     TOKENPASTE(im_,name)(x,y,z,w,q,a,b);            \
  353.     }                                 \
  354.     DL_IMMED_END(name)                         \
  355.     DL_CMPLR_BEGIN(visible,name,( type1 x, type2 y, type3 z, type4 w, type5 q, type6 a, type7 b)) \
  356.     {                                 \
  357.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  358.     ADDINTRP(name);                        \
  359.     TOKENPASTE(ADD,type1)(x);                 \
  360.     TOKENPASTE(ADD,type2)(y);                 \
  361.     TOKENPASTE(ADD,type3)(z);                 \
  362.     TOKENPASTE(ADD,type4)(w);                 \
  363.     TOKENPASTE(ADD,type5)(q);                 \
  364.     TOKENPASTE(ADD,type6)(a);                 \
  365.     TOKENPASTE(ADD,type7)(b);                 \
  366.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  367.     }                                 \
  368.     DL_CMPLR_END(name)                         \
  369.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  370.     {                                 \
  371.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type1)(0),        \
  372.             TOKENPASTE(TAKE,type2)(TOKENPASTE(DLSZ_,type1)),    \
  373.             TOKENPASTE(TAKE,type3)(2*TOKENPASTE(DLSZ_,type2)),    \
  374.             TOKENPASTE(TAKE,type4)(3*TOKENPASTE(DLSZ_,type3)),     \
  375.             TOKENPASTE(TAKE,type5)(4*TOKENPASTE(DLSZ_,type4)),     \
  376.             TOKENPASTE(TAKE,type6)(5*TOKENPASTE(DLSZ_,type5)),     \
  377.             TOKENPASTE(TAKE,type7)(6*TOKENPASTE(DLSZ_,type6)));    \
  378.     thread(name);                         \
  379.     }                                 \
  380.     DL_INTRP_END(name)
  381.  
  382. #define DL_GENCMD_CV2(intrp_sclass,name,type)            \
  383.     DL_IMMED_BEGIN(visible,name,( const type v[2]))        \
  384.     {                                 \
  385.     DL_EXTRA_IM_SETUP();                    \
  386.     TOKENPASTE(im_,name)(v[0],v[1]);            \
  387.     }                                 \
  388.     DL_IMMED_END(name)                         \
  389.     DL_CMPLR_BEGIN(visible,name,( const type v[2]))        \
  390.     {                                 \
  391.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  392.     ADDINTRP(name);                        \
  393.     ADDV2(type,v);                        \
  394.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  395.     }                                 \
  396.     DL_CMPLR_END(name)                         \
  397.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  398.     {                                 \
  399.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  400.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)));    \
  401.     thread(name);                         \
  402.     }                                 \
  403.     DL_INTRP_END(name)
  404.  
  405.  
  406. #define DL_GENCMD_CV3(intrp_sclass,name,type)            \
  407.     DL_IMMED_BEGIN(visible,name,( const type v[3]))        \
  408.     {                                 \
  409.     DL_EXTRA_IM_SETUP();                    \
  410.     TOKENPASTE(im_,name)(v[0],v[1],v[2]);            \
  411.     }                                 \
  412.     DL_IMMED_END(name)                         \
  413.     DL_CMPLR_BEGIN(visible,name,( const type v[3]))        \
  414.     {                                 \
  415.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  416.     ADDINTRP(name);                        \
  417.     ADDV3(type,v);                        \
  418.     TOKENPASTE(ADDFILL,type)();                \
  419.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  420.     }                                 \
  421.     DL_CMPLR_END(name)                         \
  422.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  423.     {                                 \
  424.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  425.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  426.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)));     \
  427.     thread(name);                         \
  428.     }                                 \
  429.     DL_INTRP_END(name)
  430.  
  431. #define DL_GENCMD_CV4(intrp_sclass,name,type)            \
  432.     DL_IMMED_BEGIN(visible,name,( const type v[4]))        \
  433.     {                                 \
  434.     DL_EXTRA_IM_SETUP();                    \
  435.     TOKENPASTE(im_,name)(v[0],v[1],v[2],v[3]);        \
  436.     }                                 \
  437.     DL_IMMED_END(name)                         \
  438.     DL_CMPLR_BEGIN(visible,name,( const type v[4]))        \
  439.     {                                 \
  440.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  441.     ADDINTRP(name);                        \
  442.     ADDV4(type,v);                        \
  443.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  444.     }                                 \
  445.     DL_CMPLR_END(name)                         \
  446.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  447.     {                                 \
  448.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  449.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  450.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)),    \
  451.             TOKENPASTE(TAKE,type)(3*TOKENPASTE(DLSZ_,type)));     \
  452.     thread(name);                         \
  453.     }                                 \
  454.     DL_INTRP_END(name)
  455.  
  456. #define DL_GENCMD_V2(intrp_sclass,name,type)            \
  457.     DL_IMMED_BEGIN(visible,name,( type v[2]))            \
  458.     {                                 \
  459.     DL_EXTRA_IM_SETUP();                    \
  460.     TOKENPASTE(im_,name)(v[0],v[1]);            \
  461.     }                                 \
  462.     DL_IMMED_END(name)                         \
  463.     DL_CMPLR_BEGIN(visible,name,( type v[2]))            \
  464.     {                                 \
  465.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  466.     ADDINTRP(name);                        \
  467.     ADDV2(type,v);                        \
  468.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  469.     }                                 \
  470.     DL_CMPLR_END(name)                         \
  471.     DL_INTRP_BEGIN(intrp_sclass,aname)                 \
  472.     {                                 \
  473.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),        \
  474.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)));    \
  475.     thread(name);                         \
  476.     }                                 \
  477.     DL_INTRP_END(name)
  478.  
  479.  
  480. #define DL_GENCMD_V3(intrp_sclass,name,type)            \
  481.     DL_IMMED_BEGIN(visible,name,( type v[3]))            \
  482.     {                                 \
  483.     DL_EXTRA_IM_SETUP();                    \
  484.     TOKENPASTE(im_,name)(v[0],v[1],v[2]);            \
  485.     }                                 \
  486.     DL_IMMED_END(name)                         \
  487.     DL_CMPLR_BEGIN(visible,name,( type v[3]))            \
  488.     {                                 \
  489.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  490.     ADDINTRP(name);                        \
  491.     ADDV3(type,v);                        \
  492.     TOKENPASTE(ADDFILL,type)();                \
  493.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  494.     }                                 \
  495.     DL_CMPLR_END(name)                         \
  496.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  497.     {                                 \
  498.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),        \
  499.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  500.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)));     \
  501.     thread(name);                         \
  502.     }                                 \
  503.     DL_INTRP_END(name)
  504.  
  505. #define DL_GENCMD_V4(intrp_sclass,name,type)            \
  506.     DL_IMMED_BEGIN(visible,name,( type v[4]))            \
  507.     {                                 \
  508.     DL_EXTRA_IM_SETUP();                    \
  509.     TOKENPASTE(im_,name)(v[0],v[1],v[2],v[3]);        \
  510.     }                                 \
  511.     DL_IMMED_END(name)                         \
  512.     DL_CMPLR_BEGIN(visible,name,( type v[4]))            \
  513.     {                                 \
  514.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));             \
  515.     ADDINTRP(name);                        \
  516.     ADDV4(type,v);                        \
  517.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));             \
  518.     }                                 \
  519.     DL_CMPLR_END(name)                         \
  520.     DL_INTRP_BEGIN(intrp_sclass,name)                 \
  521.     {                                 \
  522.     TOKENPASTE(im_,name)(TOKENPASTE(TAKE,type)(0),            \
  523.             TOKENPASTE(TAKE,type)(TOKENPASTE(DLSZ_,type)),    \
  524.             TOKENPASTE(TAKE,type)(2*TOKENPASTE(DLSZ_,type)),    \
  525.             TOKENPASTE(TAKE,type)(3*TOKENPASTE(DLSZ_,type)));     \
  526.     thread(name);                         \
  527.     }                                 \
  528.     DL_INTRP_END(name)
  529.  
  530. #if defined(LIGHT)||defined(NEWPORT)
  531. /* 
  532.  * the following is used only by LIGHT gfx, so to be safe its ifdef'ed
  533.  * however, it might be usefull to others also
  534.  */
  535. #define DL_VERTEX(name,n,type,taketype)                \
  536.     DL_IMMED_BEGIN(visible,name,(register type v[n]))        \
  537.     {                                \
  538.     im_setup;                        \
  539.     TOKENPASTE(im_,name)(v);                \
  540.     }                                \
  541.     DL_IMMED_END(name)                        \
  542.     DL_CMPLR_BEGIN(visible,name,(register type v[n]))        \
  543.     {                                \
  544.     BEGINCOMPILE(TOKENPASTE(DLSZ_,name));            \
  545.     ADDINTRP(name);                        \
  546.     TOKENPASTE(ADDV,n)(taketype,v);                \
  547.     ENDCOMPILE(TOKENPASTE(DLSZ_,name));            \
  548.     }                                \
  549.     DL_CMPLR_END(name)                        \
  550.     DL_INTRP_BEGIN(visible,name)                \
  551.     {                                \
  552.     TOKENPASTE(im_,name)(TAKEV(taketype,0));        \
  553.     thread(name);                        \
  554.     }                                \
  555.     DL_INTRP_END(name)
  556. #endif
  557.  
  558. #endif    /* !__GL_IMINTERP_H__ */
  559.